package com.zhigongtech.common.exception;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 封装的异常
 *
 * @author fengshuonan
 * @Date 2017/12/28 下午10:32
 */
@Data
@AllArgsConstructor
public class NomalException extends RuntimeException {

    /**
	 * @Fields serialVersionUID : TODO
	 * @author: Alan
	 * @date:   2019-05-25 14:05:30
	 */
	private static final long serialVersionUID = 1L;

	private Integer code;

    private String message;
    
    public NomalException(ServiceExceptionEnum exceptionEnum) {
    	this.code = exceptionEnum.getCode();
    	this.message = exceptionEnum.getMessage();
    }
}
